package biz.datalk.industrialland.common.component.filter;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.Collections;
import java.util.List;

/**
 * @author tarofang@163.com
 * @date 2020-11-16
 */
@Getter
@Setter
@ToString
@ConfigurationProperties(DatalkCorsProperties.PREFIX)
public class DatalkCorsProperties {
    public static final String PREFIX = "datalk.cors";
    private Boolean enable = false;
    /** 语序跨域的域名 */
    private List<String> accessControlAllowOrigin = Collections.singletonList("*");
    /** 允许跨域的方法 */
    private List<String> accessControlAllowMethods = Collections.singletonList("*");
    /** 允许跨域的请求头 */
    private List<String> accessControlAllowHeaders = Collections.singletonList("*");
    private Boolean allowCredentials = true;
}
